import { FetchBaseQueryError } from '@reduxjs/toolkit/query/react';

type DefaultError = {
  data: { message: string };
} & FetchBaseQueryError;

export const isFetchBaseQueryErrorType = (error: any): error is DefaultError =>
  'status' in error && 'message' in error.data;
